﻿<%@ Page Language="C#" MasterPageFile="~/jogo/Logado.Master" AutoEventWireup="true" CodeBehind="Mapa.aspx.cs" Inherits="Novapangeia.Web.Mapa" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="mainContentPlaceHolder" runat="server">
    <script type="text/javascript">
        jQuery(document).ready(function () {
            jQuery(".mini-mapa").draggable();

            carregarArea({ x: 0, y: 0 });

            jQuery(".mapa-area").each(function (i, element) {
                console.log("binding");
                jQuery(element).click(function () {
                    var data = jQuery(this).attr("data");
                    var x = data.split("-")[0];
                    var y = data.split("-")[1];
                    //jQuery(".mapa-detalhes").load("MapaArea.aspx", { x: x, y: y });
                    carregarArea({ x: x, y: y });
                });
            });
        });

        function carregarArea(coordenadas) {
            jQuery(".mapa-detalhes").load("MapaArea.aspx", coordenadas);
        }
    </script>
    <div class="mapa-detalhes">
    </div>
    <div id="miniMapa" class="mini-mapa" runat="server">
        <h3>Mini-Mapa</h3>
    </div>
 <%--   <asp:Table ID="tblMapa" runat="server" 
        BackImageUrl="/conteudo/imagens/mapaNovaPangeia.png" Height="600px" 
        Width="800px" CellPadding="5" CellSpacing="3">
    </asp:Table>--%>
</asp:Content>